<%@page import="java.util.Arrays"%>
<%@ page language="java" contentType="text/html; charset=UTF-8"
	pageEncoding="UTF-8"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>gugudan_result.jsp</title>
</head>
<body>
	<%
		request.setCharacterEncoding("utf-8");

		if (request.getParameter("gu1").equals("")) {
			out.print("<script>alert('값을 입력해주세요');history.go(-1);</script>");
		} else {
			int gu1 = Integer.parseInt(request.getParameter("gu1"));
			for (int a = 1; a <= 9; a++) {
				out.print(gu1 + "*" + a + "=" + gu1 * a + " " + "<br/>");
			}

			if (request.getParameter("su1").equals("")
					|| request.getParameter("su2").equals("")) {
				out.print("<script>alert('값을 입력해주세요');history.go(-1);</script>");
			} else {
				int su1 = Integer.parseInt(request.getParameter("su1"));
				int su2 = Integer.parseInt(request.getParameter("su2"));
				for (int a = su1; a <= su2; a++) {
					if (a % 3 == 0) {
						out.print(a + "<br/>");
					}
				}
			}
		}
	%>

</body>
</html>